<?php
ob_start();

function save_image($id, $file, $name){
	include("../../connect.php");
	$current_time = getcurrenttime();
	$command = "Insert into `photo_item` (`datecreate`,`albumid`,`name`,`path`) values ('".$current_time."','".$id."','".$name."','".$file."')";
	$result = mysql_query($command, $conn);
	if ( !$result ){
		
	}
	else {
		
	}
	mysql_free_result($result);
	mysql_close($conn);
}

function getcurrenttime(){
	$timezone  = +7; //(GMT +7:00)  
	$current_time = gmdate("Y/m/d H:i:s", time() + 3600*($timezone+date("0"))); 
	return $current_time;
}

ob_end_flush();
?>